﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Manul.Genetics.Person
{
    public class Person
    {
        public Person()
        {
            IsSterile = false;
            IsDead = false;
            ReasonOfDeath = ReasonOfDeathType.NoDeath;
            Gender = GenderType.Male;
        }

        private Person mother;
        private Person father;

        public Person Mother
        {
            get
            {
                return mother;
            }
        }

        public Person Father
        {
            get
            {
                return father;
            }
        }

        void SetParents(Person father, Person mother)
        {
            this.mother = mother;
            this.father = father;
        }

        public bool IsSterile
        { get; set; }
        

        public bool IsDead
        { get; private set; }

        public ReasonOfDeathType ReasonOfDeath
        { get; private set; }

        public string ReasonOfDeathComment
        { get; private set; }

        public void Kill(ReasonOfDeathType reason, String comment)
        {
            IsDead = true;
            ReasonOfDeath = reason;
            ReasonOfDeathComment = comment;
        }

        public GenderType Gender
        { get; set; }

        public Dictionary<String, PropertyValue> Properties = new Dictionary<String, PropertyValue>();
    }

    public enum GenderType
    {
        Male,
        Female,
        Transgender
    }

    public enum ReasonOfDeathType
    {
        NoDeath,
        Unknown,
        Genetics,
        Natural,
        Disaster
    }
}
